<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp" %>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/common/include/title.jsp" %>
		<link href="${rootPath }/common/resource/H-ui.admin/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
		<title>品牌详情 - 景航电商</title>
		<meta name="keywords"
			content="登陆 景航电商">
		<meta name="description"
			content="登陆 景航电商">
	</head>
	<body>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
			商品管理 <span class="c-gray en">&gt;</span> 品牌详情 <a
				class="btn btn-success radius r"
				style="line-height: 1.6em; margin-top: 3px"
				href="javascript:location.replace(location.href);" title="刷新"><i
				class="Hui-iconfont">&#xe68f;</i></a>
		</nav>
		<article class="page-container">
			<form action="${rootPath}/back/goods/brandUpdateSubmit.htm" method="post" class="form form-horizontal"
				id="form-member-add">
				<!-- id隐藏域 -->
				<input type="hidden" name="id" value="${requestScope.brand.id }">
				
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>名字：
					</label>
					<div class="formControls col-xs-8 col-sm-9">
						${requestScope.brand.name }
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>官网：
					</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						${requestScope.brand.website }
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>发布时间：
					</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<fmt:formatDate value="${requestScope.brand.pubTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>状态：
					</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<c:choose>
							<c:when test="${brand.status == 1}">启用</c:when>
							<c:when test="${brand.status == 0}">禁用</c:when>
							<c:otherwise>
								未知
							</c:otherwise>
						</c:choose>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>logo：
					</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<c:choose>
							<c:when test="${requestScope.brand.logoPath != null && requestScope.brand.logoPath != ''}">
								<img alt="" title="" src="${requestScope.webPath }${requestScope.brand.logoPath }" width="400" height="200">
							</c:when>
							<c:otherwise>
								<img alt="" title="这是车" src="${rootPath}/img/no_pic.png" width="400" height="200">
							</c:otherwise>
						</c:choose>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-3">
						<span class="c-red">*</span>内容：
					</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						${requestScope.brand.content }
					</div>
				</div>
			</form>
		</article>
	
		<%@ include file="/common/include/footer.jsp" %>
	
		<!--请在下方写此页面业务相关的脚本-->
		<script type="text/javascript" src="${rootPath }/common/resource/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
		<script type="text/javascript" src="${rootPath }/common/resource/H-ui.admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
		<script type="text/javascript" src="${rootPath }/common/resource/H-ui.admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
		<script type="text/javascript" src="${rootPath }/common/resource/H-ui.admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
		
		<script type="text/javascript">
			$(function() {
				$('.skin-minimal input').iCheck({
					checkboxClass : 'icheckbox-blue',
					radioClass : 'iradio-blue',
					increaseArea : '20%'
				});
	
				$("#form-member-add").validate({
					rules : {
						/* 这是一个id
						值是不同的类型*/
						name : {
							/* 必须填写 */
							required : true,
							/* 最小长度 */
							minlength : 2,
							/* 最大长度 */
							maxlength : 16
						},
						stYear : {
							/* 必须填写 */
							required : true,
							/* 必须是数字 */
							isDigits : true,
						},
						edYear : {
							/* 必须填写 */
							required : true,
							/* 必须是数字 */
							isDigits : true,
						}
	
					},
					onkeyup : false,
					focusCleanup : true,
					success : "valid",
					submitHandler : function(form) {
						/* 期望ajax提交 */
						$(form).ajaxSubmit({
							type: 'post',
							//url: "xxxxxxx" ,
							success: function(data){
								//console.info(data + "==返回==" + data.code)
								/*
								//eg
								layer.msg('同上',
								{
								  icon: 1,
								  time: 2000 //2秒关闭（如果不配置，默认是3秒）
								}, function(){
								  //do something
								}); 
								*/
								layer.msg(data.info,
										{icon:1,time:5000},
										function()
										{
											/* 关闭当前窗口 */
											var index = parent.layer.getFrameIndex(window.name);
											/* 关闭窗口前,刷新一下父页面 */
											parent.$('.btn-refresh').click();
											/* 关闭窗口 */
											parent.layer.close(index);
										}
								);
							},
							dataType:'json'
						});
					}
				});
			});
		</script>
	</body>
</html>